#ifndef FILENODE_H
#define FILENODE_H

#include <cstdlib>
#include <cstring>
#include <fstream>
#include <string>

#include <openssl/sha.h>

#include "hash.h"


class filenode
{
public:
    /* path - path to file, size - filesize */
    filenode(std::string &path, long long int size);

    virtual ~filenode();

    /* compare file to filesize */
    bool operator < (const filenode &other_node) const;

    /* get filepath */
    std::string get_path() const;

    /* get filesize */
    long long int get_size() const;

    /* get sha-512 hash file */
    hash_t get_hash();

private:
    std::string path;       /* path to file */
    long long int size;     /* filesize */
    hash_t hash;            /* sha-512 hash file */
};

#endif // FILENODE_H
